package com.gitee.tianchaohongyu.jdcl.aspect;

import com.gitee.tianchaohongyu.jdcl.core.CleanParams;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

/**
 * 对注解 @Clean 的对象进行清洗的切面
 */
@Aspect
public class CleanAspect extends AbstractParamsAspect {

  @Around("@within(clean) || @annotation(clean)")
  public Object around(ProceedingJoinPoint joinPoint, CleanParams clean) throws Throwable {
    return cleanJoinPoint(joinPoint);
  }
}